package cn.ddiancan.xddcloud.psc.flow.feign;

import java.util.List;

import cn.ddiancan.xddcloud.psc.flow.entity.XddHisInstance;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 历史流程实例数据访问层接口
 */
@FeignClient(contextId = "XddHisInstanceService", name = "xddcloud-flow-server")
public interface XddHisInstanceRemoteService {

    @PostMapping("/flow/hisInstance/insert")
    boolean insert(@RequestBody XddHisInstance hisInstance);

    @DeleteMapping("/flow/hisInstance/deleteById/{processId}")
    boolean deleteByProcessId(@PathVariable("processId") Long processId);

    @PutMapping("/flow/hisInstance/updateById")
    boolean updateById(@RequestBody XddHisInstance hisInstance);

    @GetMapping("/flow/hisInstance/selectById/{id}")
    XddHisInstance selectById(@PathVariable("id") Long id);

    @GetMapping("/flow/hisInstance/selectByprocessId/{processId}")
    List<XddHisInstance> selectListByProcessId(@PathVariable("processId") Long processId);
}
